{{- $title := .Get "title" -}}
{{- $filter := .Get "filter" }}

{{ $sponsors := index .Site.Data.sponsors $filter }}

{{ if $title }}
<h2>{{ $title }}</h2>
{{ end }}

{{ if $sponsors }}
    {{ range sort $sponsors "order" }}
    {{ partial "sponsor_entry.html" . }}
    {{ end }}
{{ else }}
No sponsors for {{ $filter }}, become one today!
{{ end }}